package com.yl.result;

import lombok.Getter;

@Getter
public class ResultVO<T> implements  java.io.Serializable{
    private int code;
    private String msg;
    private Boolean status;
    private T data;

    public ResultVO(T data){
        this(1000,"success",data,true);
    }

    public ResultVO(ResultEnum resultEnum, T data){
        this.code=resultEnum.getCode();
        this.msg=resultEnum.getMsg();
        this.status=resultEnum.getStatus();
        this.data=data;
    }

    public ResultVO(int code, String msg, T data, Boolean status){
        this.code=code;
        this.msg=msg;
        this.status=status;
        this.data=data;
    }

}
